<?php
	session_start();
	require_once("../db_connect.php");
	require_once("filter.php");

	//ボランティア詳細表示

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet"  href="../../css/admin.css" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript" src="../../js/jquery.corner.js"></script>
<script type="text/javascript"></script>
<title>管理者画面</title>
</head>
       <body>
		<div id="topmain" >
			<div id="topwaku">ボランティア管理</div>
				<div id="enpty"></div>
					<div id="topimage"><a href="manager_create.php" >管理者登録</a></div>
					<div id="topimage"><a href="ManagerLogout.php" >ログアウト</a></div>
		</div>
		<div id="leftmain">
			<div id="leftmainwaku">
				<div id="koumoku"><a href="../../manager_index.php" >・管理トップページ</a></div>
				<div id="koumoku"><a href="manage_volunteer.php" >・戻る</a></div>
			</div>
		</div>
		<div id="centerup">
		<div id="centerwaku">
			<div id="centertitle">
				<div id="centerchara">ボランティア詳細</div>
			</div>
			</div>
			<div id="centerinsert">
			<div id="centerinsert2">
	<?php
	$volunteer_detail_id  = htmlspecialchars($_GET['volunteer_detail_id'],ENT_QUOTES,"UTF-8");

	$sth = "SELECT v.volunteer_information_id,v.user_id,v.volunteer_name,s.sub_category_name,v.content,v.age,v.target_gender,
				   v.work_time,v.updata_date,v.posted_date,v.activity_date,v.end_time,v.location,v.access,v.conditions,
				   v.application_number,v.treatment_id,v.other,v.pref
			FROM volunteer_information v,sub_category s
			WHERE v.sub_category_id = s.sub_category_id
			AND v.volunteer_information_id =?";

	$data = array($volunteer_detail_id);

	$res =& $db->query($sth,$data);
	if (PEAR::isError($res)) {			//SQLの実行に失敗すればここでエラー文を出力
		die($res->getMessage());
	}
	while ($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) {	//SQLの実行結果を表示
	    ?>ボランティア名:
		<?php echo $row['volunteer_information_id'];?><br><br>
		会員ID:
		<?php echo $row['user_id'];?><br><br>
	    ボランティア名:
	    <?php echo $row['volunteer_name'];?><br><br>
	    サブカテゴリ名:
		<?php echo $row['sub_category_name'];?><br><br>
		応募内容:
		<?php echo $row['content'];?><br><br>
		対象年齢:
	    <?php echo $row['age'];?><br><br>
	    対象性別:
		<?php echo $row['target_gender'];?><br><br>
	    実働時間:
	    <?php echo $row['work_time'];?><br><br>
	    投稿更新日時:
		<?php echo $row['updata_date'];?><br><br>
		投稿終了日時:
		<?php echo $row['posted_date'];?><br><br>
		活動時間:
		<?php echo $row['activity_date'];?><br><br>
		終了時間:
		<?php echo $row['end_time'];?><br><br>
		活動場所:
		<?php echo $row['location'];?><br><br>
		移動手段:
		<?php echo $row['access'];?><br><br>
		条件:
		<?php echo $row['conditions'];?><br><br>
		応募人数:
		<?php echo $row['application_number'];?><br><br>
		その他:
		<?php echo $row['other'];?><br><br>
		開催地:
		<?php echo $row['pref'];?><br><br>
		<?php
		echo "<a href='manage_volunteer_delete.php?volunteer_delete_id=".$row['volunteer_information_id']."' >削除</a>";
	 }
?>
</div>
</div>
</div>
</body>
</html>